<template>
  <div>
    <el-dialog :visible.sync="dialog.detail" title="详情" width="80%" append-to-body>
      <div class="detail-info">
        <el-row>
          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">类型名称：</span><span v-text="form.adTypeTitle"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">类型代码：</span><span v-text="form.adTypeCode"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">类型是否可用：</span><span v-text="form.adTypeIsActive"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">广告标题：</span><span v-text="form.title"></span></el-col>
<!-- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">广告URL：</span><span v-text="form.adUrl"></span></el-col> -->
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">广告形式：</span><span v-text="form.adType"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">广告顺序：</span><span v-text="form.adOrder"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">背景颜色：</span><span v-text="form.backgroundColor"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">关联页面链接：</span><span v-text="form.linkPageUrl"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">关联页面参数：</span><span v-text="form.linkParams"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">版本号：</span><span v-text="form.version"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">创建时间：</span><span v-text="form.createTime"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">更新时间：</span><span v-text="form.updateTime"></span></el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8"><span class="detail-title">是否可用：</span><span v-text="form.isActive"></span></el-col>

        </el-row>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialog.detail = false">关闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import * as utils from '@/utils/utils'
import * as ResponseStatus from '@/utils/response-status'
const resUrl = process.env.VUE_APP_RES_URL
export default {
  name: 'AdvertisementDetail',
  data() {
    return {
      dialog: {
        detail: false
      },
      form: {
        id: undefined,
adTypeId: undefined,
adTypeTitle: undefined,
adTypeCode: undefined,
adTypeIsActive: undefined,
title: undefined,
adUrl: undefined,
adType: undefined,
adOrder: undefined,
backgroundColor: undefined,
linkPageUrl: undefined,
linkParams: undefined,
version: undefined,
createTime: undefined,
updateTime: undefined,
isActive: undefined,

      },
      dataDictCodes: ['YES_NO','ADVERTISEMENT_TYPE',],
      resUrl: resUrl
    }
  },
  computed: {},
  mounted() {},
  methods: {
    getDictItemsDisplayValue() {
      utils
        .getDataDict(this.dataDictCodes)
        .then(response => {
          if (response) {
            if (response) {
              utils.getDetailDictItemDisplayValue({
                mainComponent: this,
                dataDictItems: response,
                dictCode: 'YES_NO',
                formProp: 'adTypeIsActive'
              })
utils.getDetailDictItemDisplayValue({
                mainComponent: this,
                dataDictItems: response,
                dictCode: 'ADVERTISEMENT_TYPE',
                formProp: 'adType'
              })
utils.getDetailDictItemDisplayValue({
                mainComponent: this,
                dataDictItems: response,
                dictCode: 'YES_NO',
                formProp: 'isActive'
              })

            }
          }
        })
        .catch(error => {
          console.log(error)
        })
    }
  }
}
</script>

<style>
</style>